1. Technical Field
The present invention is related generally to software that provides a graphical user interface.
Specifically, the present invention is directed toward providing a means of modifying the properties of graphical user interface components without resorting to extensive changes in source code.
2. Description of Related Art
Many computer software products today utilize a graphical user interface or GUI (typically pronounced like “gooey”). A GUI is simply a visual means of human-computer interaction that utilizes pictures or other visual representations besides text or characters.
Most GUIs make use of visual controls that are displayed on the user's display and actuated by user input in order to provide input to the software associated with the GUI. In a typical GUI, a pointing device, such as a mouse, is used to move a cursor around a display and actuate visual controls. A GUI will typically also make use static display components, such as icons or text, for the display of information.
Many GUIs are what is known as a “windowing” interface, because they arrange information visually on a display in the form of panels or “windows” superimposed on a background called a “desktop.” Typically, a window will contain a number of visual controls and static display component to facilitate user interaction.
Windows, visual controls, and static display components are what are known as GUI components, because they are the building blocks that make up the GUI. Some GUI components, such as windows, are known as “container components” (or simply “containers”), because they may contain other components. Because a container component is itself a component, a container may also contain another container.
Container components include windows, but may also include other components, which may be visible or invisible. Some GUIs make use of invisible container components to group other components together in some visual arrangement or non-visual relationship (e.g., mutually exclusive checkboxes).
Many modern programming language implementations have built-in features for producing GUIs, usually either by providing an interface to services provided by system-level software or by including standard libraries of GUI code. The JAVA™ programming language, for example, is an object-oriented programming language that includes standard application programming interfaces (APIs) for defining GUIs. Two APIs that are currently part of the JAVA™ programming language standard are the Abstract Windowing Toolkit (AWT) API and the Swing API. In the JAVA™ programming language, as is typical of object-oriented GUI APIs, each type of GUI component is defined as a class.
In an object-oriented programming language, a class is a definition of a data type that includes a collection of data, called member variables, and a set of operations that may be performed on the data, called methods (or alternatively, member functions). An actual collection of data in the data type defined by a class is called an object. In object-oriented programming (OOP) parlance, an object is said to be an “instance” of its class, because it is an actual item of data that is defined in accordance with the class. The run-time process of generating an object in an object-oriented programming language is called “instantiation,” and an object that exists at run-time is said to be “instantiated.”
Object-oriented programming languages also typically provide for what is known as “inheritance.” Using inheritance, a new class (called a “descendant” class) can be defined in terms of one or more existing classes (called “base” classes) so that the descendant class inherits one or more of the member variables or methods of the base class. As a general rule in object-oriented languages, an object of a descendant class can be treated as being an instance of the base class. This ability to treat objects from descendant classes as if they were instances of base classes is called “polymorphism.”
In an object-oriented GUI API, such as those provided by the JAVA™ programming language, GUI components are instantiated as objects, and relationships are established between the instantiated objects in order to define the placement and behavior of GUI components with respect to each other. For example, a “containment relation” is a relationship between GUI components that relates a container component to the components contained by that container component. In an object-oriented GUI API, for example, container classes may define methods that establish a containment relation by making the container contain some other component.
A typical GUI component has one or more attributes that define particular properties of the component. For example, a “button” component in a typical GUI will have attributes that define the size of the button on the display, the text or graphics displayed on the face of the button, the background color of the button, a keyboard shortcut associated with the button, and the like. In general, the portion of program code (e.g., function, method, subroutine, procedure, etc.) that instantiates a GUI component will also contain a number of lines of code that set the attributes for that component to desired values.
Sometimes, the general look or GUI content of an entire computer program needs to be modified. In cases such as these, different attributes for the GUI components will need to be set. For example, it may be necessary to enlarge all of the GUI components and their text if a program is being adapted to be used by users with poor eyesight. As another example, if a program is being adapted for users speaking different languages, the text, character set, and component sizes may need to be modified. If the code that sets attributes for each component is buried within the source code for the program along with the code for instantiating the components, this means that an exhaustive search and careful modification of the of the source code is necessary in order to effect this sort of large-scale or global change in GUI display or behavior.
As another example, it is sometimes necessary to adapt a program to execute in multiple display modes. For example, it may be necessary to use different colors at different times of the day. In such cases, global changes to an existing GUI display at run-time will be necessary.
GUI component attributes for a single component are difficult to modify, as well, because the code for setting attributes for that component may be buried within many lines of code or even spread out across a large program.
Thus, a need exists for a means to effect large-scale or global changes to attributes of GUI components without invasive program code modification.